import * as React from "react";
import { makeStyles } from "@material-ui/styles";
import { StyleRules } from "@material-ui/styles/withStyles";
import { Route, Router, Switch } from "react-router-dom";
import AddPerson from "./AddPerson";
import ViewPerson from "./ViewPerson";

const useStyles = makeStyles<StyleRules<any, "root">>({
  root: {
    minHeight: "95vh"
  }
});
const Contents = () => {
  const clsses = useStyles();
  return (
    <div className={clsses.root}>
      <Switch>
        <Route path={"/add-person"} component={AddPerson} />
        <Route component={ViewPerson} path={"/view-person"} />
        <Route path={"/"} component={AddPerson} />
      </Switch>
    </div>
  );
};
export default Contents;
